package org.destiny.hello.world.controller;

import java.util.List;

import org.destiny.hello.world.entity.Student;
import org.destiny.hello.world.respository.StudentRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private StudentRepository studentRepository;

    @RequestMapping("/queryStudentAll")
    public List<Student> queryStudentAll() {
        return studentRepository.findAll();
    }
}
